

package com.hazelcast.query.impl.predicates;

import com.hazelcast.query.Predicate;
import com.hazelcast.query.impl.IndexRegistry;

/**
 * Optimizes predicate for faster execution.
 * It has to treat input predicate as immutable. It may return the same instance
 * if no optimization has been performed.
 */
public interface QueryOptimizer {
    <K, V> Predicate<K, V> optimize(Predicate<K, V> predicate, IndexRegistry indexes);
}
